package com.kai.qiang.ui

import android.content.Intent
import com.kai.base.base.activity.BaseVBActivity
import com.kai.base.utils.LogUtils
import com.kai.qiang.databinding.ActivitySplashBinding
import kotlinx.coroutines.*
import org.jsoup.Connection
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements

/**
 * @Author: 小强同学
 * @Date:  2021/1/27 11:49
 * @Description:  java类作用描述
 */
class SplashActivity : BaseVBActivity<ActivitySplashBinding>() {

    override fun getViewBinding(): ActivitySplashBinding = ActivitySplashBinding.inflate(layoutInflater)

    override fun initViews() {
        GlobalScope.launch {
            delay(1000L)
            withContext(Dispatchers.Main) {
                startAct()
            }
        }

    }

    private fun startAct() {
        startActivity(Intent(this, MainActivity::class.java))
        finish()
    }
}